package com.example.myapplication.old.entity;

import android.os.Parcel;
import android.os.Parcelable;

public class User1 implements Parcelable {
    private String username;
    private int img;
    private int id;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public User1() {
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getImg() {
        return img;
    }

    public void setImg(int img) {
        this.img = img;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.username);
        dest.writeInt(this.img);
    }

    public void readFromParcel(Parcel source) {
        this.username = source.readString();
        this.img = source.readInt();
    }

    protected User1(Parcel in) {
        this.username = in.readString();
        this.img = in.readInt();
    }

    public static final Parcelable.Creator<User1> CREATOR = new Parcelable.Creator<User1>() {
        @Override
        public User1 createFromParcel(Parcel source) {
            return new User1(source);
        }

        @Override
        public User1[] newArray(int size) {
            return new User1[size];
        }
    };
}
